package com.xiaouyudeguang.common.annotation;

import com.alibaba.cloud.dubbo.annotation.DubboTransported;
import org.apache.dubbo.common.constants.CommonConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@FeignClient
@DubboTransported(protocol = CommonConstants.DUBBO_PROTOCOL)
public @interface Api {

    @AliasFor(annotation = FeignClient.class)
    String value() default "";

    @AliasFor(annotation = FeignClient.class)
    String contextId();

    @AliasFor(annotation = FeignClient.class)
    String name() default "";

    @AliasFor(annotation = FeignClient.class)
    String qualifier() default "";

    @AliasFor(annotation = FeignClient.class)
    String[] qualifiers() default {};

    @AliasFor(annotation = FeignClient.class)
    String url();

    @AliasFor(annotation = FeignClient.class)
    boolean decode404() default false;

    @AliasFor(annotation = FeignClient.class)
    Class<?>[] configuration() default {};

    @AliasFor(annotation = FeignClient.class)
    Class<?> fallback() default void.class;

    @AliasFor(annotation = FeignClient.class)
    Class<?> fallbackFactory() default void.class;

    @AliasFor(annotation = FeignClient.class)
    String path();

    @AliasFor(annotation = FeignClient.class)
    boolean primary() default true;

    Class<?> entityType() default Void.class;

}
